# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-net-server
_realname=Net-Server
pkgver=2.010
pkgrel=0
pkgdesc="Extensible, general Perl server engine"
url="https://metacpan.org/release/Net-Server/"
arch="noarch"
license="Artistic-1.0 GPL+"
depends="perl"
install=
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RH/RHANDOM/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

prepare() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
        find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="b4c1a85263e81c4ad6f32e28acb5176002ad591a1140dca060b706901758f48d3c63c4077606d772540e18fc6fa6772e71d213d0a4940e903c597b0e0f844365  Net-Server-2.010.tar.gz"
